include ../../entity/EntityMixin

mixin popupComponentItem(itemValue, field, fClass, listFieldNames)
    tr.fw-field-item(class=fClass, itemValue=itemValue && JSON.stringify(itemValue))
        td
            if !field.readonly
                a.fw-remove-item-component.iconfont.icon-delete.fw-icon-button(href="javascript:")
        td
            if !field.readonly
                a.fw-edit-item-component.iconfont.icon-edit.fw-icon-button(href="javascript:")
        -var refEntityFields = F.meta.entities[field.refEntity].fields
        each name in listFieldNames
            td
                +renderFieldValue(refEntityFields[name], itemValue, false)